#ifndef ZERODIALOG_H
#define ZERODIALOG_H

#include "models/command.h"
#include "popupdialog.h"
#include <QCheckBox>
#include <QLabel>
#include <QMap>
#include <QWidget>

namespace Ui {
class ZeroDialog;
}

class ZeroDialog : public PopupDialog
{
    Q_OBJECT

public:
    explicit ZeroDialog(QWidget *parent = nullptr);
    ~ZeroDialog();

private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_clicked();

    void on_checkBox_head_toggled(bool checked);

    void on_checkBox_waist_toggled(bool checked);

    void on_checkBox_leftarm_toggled(bool checked);

    void on_checkBox_rightarm_toggled(bool checked);

    void on_checkBox_leftleg_toggled(bool checked);

    void on_checkBox_rightleg_toggled(bool checked);

    void on_checkBox_all_clicked();

    void on_checkBox_head_clicked();

    void on_checkBox_waist_clicked();

    void on_checkBox_leftarm_clicked();

    void on_checkBox_rightarm_clicked();

    void on_checkBox_leftleg_clicked();

    void on_checkBox_rightleg_clicked();

    void onJointCbxClicked();

    void on_pushButton_4_clicked();

    void updateData();

private:
    void setupUI();
    void createJointsByType(JointType type, QCheckBox * pCheckBox);
    void scaleWidgets(QWidget *widget, double xScale,double yScale);
    void updateSelectAll();

    Ui::ZeroDialog *ui;
    QMap<int,QCheckBox*> m_mpCbx;
    QMap<int,QLabel*> m_mpLabel;
};

#endif // ZERODIALOG_H
